-- GENERATED SPELL FOR [Emissary Roman'khan] --


function spell0_14862(pUnit, Event) --@System Shock,n/a--
pUnit:FullCastSpellOnTarget(23774,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14862', 650, 1)
end

function spell1_14862(pUnit, Event) --@Wilt,Self--
pUnit:FullCastSpellOnTarget(23772,pUnit)
pUnit:RegisterEvent('Sorts_14862', 610, 1)
end

function Sorts_14862(pUnit, Event)
local choix_sorts_14862 = math.random(0, 1)
if choix_sorts_14862 == 0 then
pUnit:RegisterEvent('spell0_14862', 1, 1)
end
if choix_sorts_14862 == 1 then
pUnit:RegisterEvent('spell1_14862', 1, 1)
end
end

function mob14862_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14862', math.random(1500, 3000), 1)
end

function mob14862_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14862_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14862_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14862, 1, 'mob14862_Action')
RegisterUnitEvent(14862, 2, 'mob14862_Leave')
RegisterUnitEvent(14862, 3, 'mob14862_Kill')
RegisterUnitEvent(14862, 4, 'mob14862_Die')
